package com.framework.core.mvp;

import com.framework.core.rest.HttpUtils;

import retrofit2.Retrofit;

/**
 * @author shenmengchao
 * @version 1.0.0
 * @date 2017/7/18
 * @description
 */

public class BasePresenter<T extends BaseView> {

    protected Retrofit mRetrofit;
    private T mMvpView;

    public BasePresenter(){
        mRetrofit = HttpUtils.getInstance().getRetrofitClient();
    }

    public void attachView(T mvpView){
        this.mMvpView = mvpView;
    }

    public void detachView(){
        mMvpView = null;
    }

    public boolean isViewAttached(){
        return null != mMvpView;
    }

    public T getMvpView(){
        return mMvpView;
    }


}
